package it.trio.minesweeper.domain;

public class MineSquare {
    boolean covered = true;
	private MSGame game;
    private MineField minefield;
	
    public MineSquare(MSGame game, MineField minefield) {
    	this.game = game;
    	this.minefield = minefield;
    }
    
	public boolean isCovered() {
		return covered;
	}

	public void uncover() {
		if (covered)
			onUncover();
	}

	private void onUncover() {
		covered = false;
		minefield.decrementCovered();
		game.lose();
	}

	public MSGame getMSGame() {
		return null;
	}
}
